<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class UserList extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'pageNum' => 'required|integer',
            'pageSize' => 'required|integer'
        ];
    }

    public function messages()
    {
        return [
            'pageNum.required' => '页数必填',
            'pageNum.integer' => '页数格式错误',
            'pageSize.required' => '页偏移量必填',
            'pageSize.integer' => '页偏移量格式错误'
        ];
    }
}
